import demoSmsAdminApiConfig from '@/core/demoSms/generated/apiconfig/demoSmsAdminApiConfig'
import serverApiMockUtils from '../../utils/serverApiMockUtils'
import mockProdServerUtils from '../../utils/mockUtils'
import { MockMethod } from 'vite-plugin-mock'
import Mock from 'mockjs'
import DemoApplicationResponse from '@/core/demoSms/generated/types/model/response/DemoApplicationResponse'

const content: DemoApplicationResponse[] = []
for (let i = 0; i < 10; i++) {
	content.push({
		id: i.toString(),
		title: `title_示例应用_${i.toString()}`,
		deleteFlag: '0',
		createTime: new Date().getTime().toString(),
		updateTime: new Date().getTime().toString(),
		rowVersion: 1,
	} as DemoApplicationResponse)
}

const mockList: MockMethod[] = [...serverApiMockUtils.getDefaultServerApi(demoSmsAdminApiConfig.demoApplication, content)]

mockProdServerUtils.addMockList(...mockList)

export const items = content
